import http from '@/api/request.js';


// 商品列表
export function getGoodsList(params = {}) {
  return http({
    url: '/dz/dzMaterialSku/pageMiniSkuList',
    method: 'get',
    params: params
  });
}

// 商品详情
export function getGoodsDetail(params = {}) {
  return http({
    url: '/dz/dzMaterialSku/getDetailById',
    method: 'get',
    params: params
  });
}

// 商品收藏
export function collectGoods(params = {}) {
  return http({
    url: '/dz/dzFavorite/add',
    method: 'post',
    params: params
  });
}

// 商品取消收藏
export function collectRemoveGoods(params = {}) {
  return http({
    url: '/dz/dzFavorite/delete',
    method: 'get',
    params: params
  });
}

// 加入清单
export function addCart(params = {}) {
  return http({
    url: '/dz/dzMaterialSkuCart/add',
    method: 'post',
    params: params
  });
}

// 删除清单
export function removeCart(params = {}) {
  return http({
    url: '/dz/dzMaterialSkuCart/delete',
    method: 'post',
    params: params
  });
}